<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">  
<title>专利协同服务网络平台</title>
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-3.2.1.min.js"></script>
<style type="text/css">
.imgtable td{
	height:50px;
}
#checkbook{
	font-size:15px;
	color:#5A98DE;
	font-weight:bold;
}
</style>
</head>

<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="#">首页</a></li>
			<li><a href="#" onClick="javascript:history.back();">沟通交流</a></li>
		</ul>
    </div>  
    <div class="formbody">    
		<div id="usual1" class="usual"> 
			<div class="formtitle">
	    		<span>问题信息</span>
	    	</div>
			<div class="rightinfo">
				<form action="${pageContext.request.contextPath}${pageModel.url}" method="post">
					<ul class="seachform" style="margin-left: 20px;">
						<li><label>问题标题</label><input name="title" type="text" class="scinput" style="width:500px;"/></li>
						<li><label>&nbsp;</label><input type="submit" class="scbtn"  value="查询"/></li>
						<li><label>&nbsp;</label><input type="button" onclick="postQuestionUI('${patentId}')" class="scbtn"   value="提出问题" style="width:100px;"/></li>
						<li><label>&nbsp;</label><input type="button" onclick="chatHistoryUI('${patentId}','${patentName }')" class="scbtn"   value="查看在线交流记录" style="width:100px;"/></li>
						<li><label>&nbsp;</label><input type="button" onclick="chatUI('${patentId}','${patentName }')" class="scbtn"   value="前往在线交流" style="width:100px;"/></li>
						<li><label>&nbsp;</label><input type="button" onclick="history.back()" class="scbtn"  value="返回" /></li>
						<li style="text-align: center;padding-top:8px;"><span id="searchError" style="color:red;"></span></li>
					</ul>
				</form>
				<table class="imgtable">	
					<thead>
						<tr>
							<th>提出时间</th>
							<th>问题标题</th>
							<th>提出人</th>
							<th>角色类型</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${pageModel.list}" var="poster">
							<tr>
								<td>${fn:substring(poster.createTime,0,19)}</td>
								<td>${poster.title}</td>
								<td>${poster.userName}</td>
								<td><c:forEach items="${dicUserTypes}" var="dicUserType">
									<c:if test="${dicUserType.typeCode == poster.userType}">
										${dicUserType.description}
									</c:if>
								</c:forEach></td>
								<td><a href="${pageContext.request.contextPath}/poster/postContentUI.do?posterId=${poster.id}" id="checkbook">[查看详细]</a></td>
							</tr>
						</c:forEach>
					</tbody>	
				</table>
				<!-- 
				引入分页菜单
				 -->
				<%@include file="../common/page.jsp"%>
			</div>
		</div>   
	</div> 
	<script type="text/javascript"> 
	  $('.imgtable tbody tr:odd').addClass('odd');
	  function postQuestionUI(patentId){
		  window.location.href="${pageContext.request.contextPath}/poster/postQuestionUI.do?patentId="+patentId;
	  }
	  function chatHistoryUI(patentId,patentName){
		  window.location.href="${pageContext.request.contextPath}/chater/toChatListHistoryView.do?patentId="+patentId+"&patentName="+patentName;

	  }
	  function chatUI(patentId,patentName){
		  window.location.href="${pageContext.request.contextPath}/chater/toChatListHistoryView.do?patentId="+patentId+"&patentName="+patentName;

	  }
	</script>
</body>
</html>